<template>
  <div class="BannerRotation center-wrap" ref='BannerRotation'>
    <div class="banner-top">
      <!-- 左侧轮播 -->
      <div class="rotation-carousel">
        <el-carousel trigger="click" height="242px" :interval="5000">
          <el-carousel-item class="banner-carousel-item" v-for="(item,index) in bannerList" :key="index" :style="'background-image:url('+item.img+')'">
            <p class="banner-carousel-title">{{item.title}}</p>
          </el-carousel-item>
        </el-carousel>
        <span class="rotation-carousel-more">更多<i class="el-icon-arrow-right"></i></span>
      </div>
      <!-- 右侧推荐 -->
      <div class="recommend-content">
        <div class="recommend-item" v-for="(item,index) in recommendlist.slice(recommenindex1,recommenindex2)" :key="index"
          :style="'background-image:url('+item.img+')'">
          <div class="recommend-item-info">
            <div class="recommend-item-content">
              <p class="recommend-item-title" :title="item.title">{{item.title}}</p>
              <p class="recommend-item-name" style="color:#e0e0e0"><i class="iconfont icon-UPzhu"></i>{{item.name}}</p>
              <p class="recommend-item-playnum">{{item.num}}万播放</p>
            </div>
          </div>
          <span class="recommend-later">
            <i class="iconfont icon-shaohouzaikanx1"></i>
            <span class="recommend-later-text">稍后再看</span>
          </span>
        </div>
        <!-- 按钮 -->
        <span class="recommend-btn recommend-btn-perv" @click="pageClick('perv')"><i class="el-icon-arrow-left"></i></span>
        <span class="recommend-btn recommend-btn-next" @click="pageClick('next')"><i class="el-icon-arrow-right"></i></span>
      </div>
    </div>
    <!-- 推广 -->
    <div class="extension-container">
      <div class="left-extension">
        <div class="left-extension-header">
          <div class="left-extension-info">
            <!-- <i class="icon-extension iconfont icon-tuiguang"></i> -->
            <svg class="ext-svg" t="1594799537798" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3887" width="200" height="200"><path d="M324.557 660.316v56.832c0 30.193 24.473 54.672 54.671 54.672 30.193 0 54.672-24.474 54.672-54.672v-14.05l-109.343-42.782z m186.47 72.965c-7.961 65.72-63.933 116.639-131.799 116.639-73.328 0-132.772-59.443-132.772-132.772V629.75L129.3 583.91v0.067a39.05 39.05 0 1 1-78.1 0V411.72a39.05 39.05 0 0 1 78.1 0v0.066l499.85-195.594V192.65a39.05 39.05 0 1 1 78.106 0v610.396a39.05 39.05 0 1 1-78.105 0v-23.541L511.032 733.28z" fill="#FFD778" p-id="3888"></path><path d="M808.786 458.732H933.75a39.05 39.05 0 0 1 39.05 39.05v0.133a39.05 39.05 0 0 1-39.05 39.05H808.786a39.05 39.05 0 0 1-39.05-39.05v-0.133a39.05 39.05 0 0 1 39.05-39.05z m-3.313 130.437l108.258 62.612a39.05 39.05 0 0 1 14.284 53.3l-0.056 0.102a39.045 39.045 0 0 1-53.376 14.3l-108.257-62.618a39.05 39.05 0 0 1-14.285-53.299l0.056-0.097a39.045 39.045 0 0 1 53.376-14.3z m-39.147-250.343l108.257-62.612a39.045 39.045 0 0 1 53.376 14.305l0.051 0.092a39.05 39.05 0 0 1-14.285 53.305l-108.247 62.612a39.045 39.045 0 0 1-53.376-14.3l-0.05-0.097a39.05 39.05 0 0 1 14.279-53.3z" fill="#FB813A" p-id="3889"></path></svg>
            <div class="text-extension">推广</div>
            <div class="title-extension">
              <i class="iconfont icon-redu-copy"></i>
              考试完快去B站吃顿好的
            </div>
          </div>
        </div>
        <!-- 视频 -->
        <div class="extension-video-container">
          <div class="extension-video-item" v-for="(item,index) in extensionlist" :key="index">
            <!-- 上方图片 -->
            <div class="extension-top-img" @mousemove="extensionMove($event,index)" @mouseenter="extensionEnter(index)" @mouseleave="extensionLeave(index)" ref="extensionTopImg">
              <div class="topimg-box">
                <img class="extension-video-img" :src="item.img" alt="">
                <div class="extension-top-count">
                  <div class="count-left"></div>
                  <div class="count-right">
                    <span>{{item.time}}</span>
                  </div>
                </div>
                <p class="extension-video-title" :title="item.title">{{item.title}}</p>
                <!-- 动态背景图 -->
                <div class="extension-dynamic-bg" :style="'background-image:url('+item.bg+');background-position:-'+X*boxW+'px -'+Y*boxH+'px;'"
                  ref="extensionDynamicBg">
                  <div class="extension-dynamic-top">
                    <span :style="'width:'+speedBar+'%'"></span>
                  </div>
                </div>
                <!-- 弹幕 -->
                <div class="extension-danmu-content" ref="extensionDanmuContent">
                  <span class="extension-danmu-item"  v-for="(items,indexs) in item.list" :key="indexs" ref="extensionDanmuItem">{{items}}</span>
                  <!-- :style="`left:-${danmuW[indexs]}px;transition: left ${danmuT[indexs]}s linear 0s;`" -->
                </div>
              </div>
              <div class="extension-video-Later" @mousemove="laterMove(index)" @mouseout="laterOut(index)">
                <i class="iconfont icon-shaohouzaikanx1"></i>
                <span class="extension-video-latertext">稍后再看</span>
              </div>
            </div>
            <!-- 文字信息 -->
            <div class="extension-upname">
              <i class="iconfont icon-UPzhu"></i>
              {{item.name}}
            </div>
          </div>
        </div>
      </div>
      <div class="right-online">
        <div class="right-online-header">
          <span class="right-online-title">在线列表</span>
        </div>
        <div class="right-ad-bottom">
          <img src="../../assets/img/jdhp.jpg" alt="">
          <i></i>
        </div>
      </div>
    </div>
    <!-- 电竞赛事 -->
    <div class="ext-match">
      <!-- 左 -->
      <div class="ext-match-left">
        <div class="ext-match-header">
          <div class="ext-match-header-icon">
            <img src="../../assets/img/guanjv_icon.png" alt="">
            <span>电竞赛事</span>
          </div>
        </div>
        <div class="ext-content">
          <div class="ext-item" v-for="(item,index) in extlist" :key="index">
            <div class="ext-item-container">
              <div class="ext-item-linbar">
                <img class="ext-play-img" :src="item.img" alt="">
                <div class="ext-item-count">
                  <div class="ext-count-left">
                    <span><i class="iconfont icon-bofangliang" v-if="item.playnum"></i>{{item.playnum}}</span>
                    <span><i class="iconfont icon-dianzan" v-if="item.dz"></i>{{item.dz}}</span>
                  </div>
                  <div class="ext-count-right">
                    <i class="iconfont icon-people" v-if="item.people"></i>
                    {{item.people}}{{item.time}}
                  </div>
                </div>
              </div>
             <span class="ext-later" v-if="item.time">
               <i class="iconfont icon-shaohouzaikanx1"></i>
               <span class="ext-later-text">稍后再看</span>
             </span>
             <div class="ext-item-title">
               <span class="ext-item-state" v-if="item.state">
                 <span></span>
                 {{item.state}}
               </span>
               <span>{{item.title}}</span>
             </div>
            </div>
          </div>
        </div>
      </div>
      <!-- 右 -->
      <div class="ext-match-right">
        <img src="../../assets/img/djss_left.png" alt="">
      </div>
    </div>
  </div>
</template>

<script>
  import eventBus from '../../eventBus.js'
  export default {
    name: 'BannerRotation',
    data() {
      return {
        bannerList: [{
            img: require('../../assets/img/banner1.jpg'),
            title: '你毕业那一天什么样？'
          },
          {
            img: require('../../assets/img/banner2.jpg'),
            title: '你毕业那一天什么样？'
          },
          {
            img: require('../../assets/img/banner3.jpg'),
            title: '你毕业那一天什么样？'
          },
          {
            img: require('../../assets/img/banner4.jpg'),
            title: '你毕业那一天什么样？'
          },
          {
            img: require('../../assets/img/banner5.jpg'),
            title: '你毕业那一天什么样？'
          },
        ],
        recommenindex1: 0,
        recommenindex2: 6,
        recommendlist: [{
            img: require('../../assets/img/recommend_right1.jpg'),
            title: "《明日方舟》EP - Everything's Alright by DJ Okawari'",
            name: '明日方舟',
            num: '68.1'
          },
          {
            img: require('../../assets/img/recommend_right1.jpg'),
            title: "《明日方舟》EP - Everything's Alright by DJ Okawari'",
            name: '明日方舟',
            num: '68.1'
          },
          {
            img: require('../../assets/img/recommend_right1.jpg'),
            title: "《明日方舟》EP - Everything's Alright by DJ Okawari'",
            name: '明日方舟',
            num: '68.1'
          },
          {
            img: require('../../assets/img/recommend_right1.jpg'),
            title: "《明日方舟》EP - Everything's Alright by DJ Okawari'",
            name: '明日方舟',
            num: '68.1'
          },
          {
            img: require('../../assets/img/recommend_right1.jpg'),
            title: "《明日方舟》EP - Everything's Alright by DJ Okawari'",
            name: '明日方舟',
            num: '68.1'
          },
          {
            img: require('../../assets/img/recommend_right1.jpg'),
            title: "《明日方舟》EP - Everything's Alright by DJ Okawari'",
            name: '明日方舟',
            num: '68.1'
          },
          {
            img: require('../../assets/img/recommend_right2.jpg'),
            title: "【番声】他一集装的逼够别人装一年！（七月新番食用报告其一）",
            name: 'JK低手鱼太',
            num: '4.6'
          },
          {
            img: require('../../assets/img/recommend_right2.jpg'),
            title: "【番声】他一集装的逼够别人装一年！（七月新番食用报告其一）",
            name: 'JK低手鱼太',
            num: '4.6'
          },
          {
            img: require('../../assets/img/recommend_right2.jpg'),
            title: "【番声】他一集装的逼够别人装一年！（七月新番食用报告其一）",
            name: 'JK低手鱼太',
            num: '4.6'
          },
          {
            img: require('../../assets/img/recommend_right2.jpg'),
            title: "【番声】他一集装的逼够别人装一年！（七月新番食用报告其一）",
            name: 'JK低手鱼太',
            num: '4.6'
          },
          {
            img: require('../../assets/img/recommend_right2.jpg'),
            title: "【番声】他一集装的逼够别人装一年！（七月新番食用报告其一）",
            name: 'JK低手鱼太',
            num: '4.6'
          },
          {
            img: require('../../assets/img/recommend_right2.jpg'),
            title: "【番声】他一集装的逼够别人装一年！（七月新番食用报告其一）",
            name: 'JK低手鱼太',
            num: '4.6'
          },
          {
            img: require('../../assets/img/recommend_right3.jpg'),
            title: "腾讯VS老干妈：这波是我输了！【膨胀说】",
            name: '亚食人',
            num: '6.8'
          },
          {
            img: require('../../assets/img/recommend_right3.jpg'),
            title: "腾讯VS老干妈：这波是我输了！【膨胀说】",
            name: '亚食人',
            num: '6.8'
          },
          {
            img: require('../../assets/img/recommend_right3.jpg'),
            title: "腾讯VS老干妈：这波是我输了！【膨胀说】",
            name: '亚食人',
            num: '6.8'
          },
          {
            img: require('../../assets/img/recommend_right3.jpg'),
            title: "腾讯VS老干妈：这波是我输了！【膨胀说】",
            name: '亚食人',
            num: '6.8'
          },
          {
            img: require('../../assets/img/recommend_right3.jpg'),
            title: "腾讯VS老干妈：这波是我输了！【膨胀说】",
            name: '亚食人',
            num: '6.8'
          },
          {
            img: require('../../assets/img/recommend_right3.jpg'),
            title: "腾讯VS老干妈：这波是我输了！【膨胀说】",
            name: '亚食人',
            num: '6.8'
          },
        ],
        extensionlist: [{
            img: require('../../assets/img/extension_img1.jpg'),
            bg: require('../../assets/img/extension1_img1.jpg'),
            bgnum: '28',
            title: '你不要过来啊！',
            time: '02:21',
            name: '一个人的世界',
            list: ['哈哈哈', '我不做人啦，会长！！！', 're0必须要有排面！', '哎哟卧槽', '我知道我的头即将要被笑飞了', '封面选的好，绅士少不了', '我笑死了你有什么好处？',
              '如果沙雕有颜色一定是蓝色的', '这个封面我好像在哪里见过', '全是我的老婆', '你币有了', '绅士们相见即是缘分', '女朋友就是这样被你打坏的'
            ]
          },
          {
            img: require('../../assets/img/extension_img1.jpg'),
            bg: require('../../assets/img/extension1_img1.jpg'),
            bgnum: '28',
            title: '你不要过来啊！',
            time: '02:21',
            name: '一个人的世界',
            list: ['哈哈哈', '我不做人啦，会长！！！', 're0必须要有排面！', '哎哟卧槽', '我知道我的头即将要被笑飞了', '封面选的好，绅士少不了', '我笑死了你有什么好处？',
              '如果沙雕有颜色一定是蓝色的', '这个封面我好像在哪里见过', '全是我的老婆', '你币有了', '绅士们相见即是缘分', '女朋友就是这样被你打坏的'
            ]
          },
          {
            img: require('../../assets/img/extension_img1.jpg'),
            bg: require('../../assets/img/extension1_img1.jpg'),
            bgnum: '28',
            title: '你不要过来啊！',
            time: '02:21',
            name: '一个人的世界',
            list: ['哈哈哈', '我不做人啦，会长！！！', 're0必须要有排面！', '哎哟卧槽', '我知道我的头即将要被笑飞了', '封面选的好，绅士少不了', '我笑死了你有什么好处？',
              '如果沙雕有颜色一定是蓝色的', '这个封面我好像在哪里见过', '全是我的老婆', '你币有了', '绅士们相见即是缘分', '女朋友就是这样被你打坏的'
            ]
          },
          {
            img: require('../../assets/img/extension_img1.jpg'),
            bg: require('../../assets/img/extension1_img1.jpg'),
            bgnum: '28',
            title: '你不要过来啊！',
            time: '02:21',
            name: '一个人的世界',
            list: ['哈哈哈', '我不做人啦，会长！！！', 're0必须要有排面！', '哎哟卧槽', '我知道我的头即将要被笑飞了', '封面选的好，绅士少不了', '我笑死了你有什么好处？',
              '如果沙雕有颜色一定是蓝色的', '这个封面我好像在哪里见过', '全是我的老婆', '你币有了', '绅士们相见即是缘分', '女朋友就是这样被你打坏的'
            ]
          },
        ],
        X: '',
        Y: '',
        boxW: '',
        boxH: '',
        speedBar: '',
        // extensionindex:0,
        timer:null,//定时器
        timenum:-1,//弹幕动画初始值
        extensionimgindex:0,
        extlist:[//电竞赛事
          {img:require('../../assets/img/djzb.jpg'),people:'283.0万',state:'直播中',title:'TES vs V5 2020LPL夏季赛'},
          {img:require('../../assets/img/djzb.jpg'),playnum:'58.4万',dz:'2.0万',time:'1:07:04',title:'【LPL夏季赛】7月12日 饭堂周末夜'},
          {img:require('../../assets/img/djzb.jpg'),playnum:'126.4万',dz:'1.8万',time:'3:44:46',title:'【LPL夏季赛】7月11日 TES vs FPX'},
          {img:require('../../assets/img/djzb.jpg'),playnum:'12.2万',dz:'8459',time:'01:40',title:'【英雄联盟赛事】花式装杯 谦逊阿水赛后采访合集'},
        ]
      }
    },
    methods: {
      pageClick(type) {
        if (type == 'perv') {
          this.recommenindex1 -= 6
          this.recommenindex2 -= 6
          if (this.recommenindex1 < 0) {
            this.recommenindex1 = this.recommendlist.length - 6
            this.recommenindex2 = this.recommendlist.length
          }
        } else if (type == 'next') {
          this.recommenindex1 += 6
          this.recommenindex2 += 6
          if (this.recommenindex1 > 12) {
            this.recommenindex1 = 0
            this.recommenindex2 = 6
          }
        }
      },
      // 滑动预览效果
      extensionMove(e, index) {
        // 容器宽度
        let boxwidth = this.$refs.extensionTopImg[index].clientWidth
        //每份宽度
        let itemwidth = boxwidth / this.extensionlist[index].bgnum
        //要调用第几张图片 鼠标位置 除以 每份宽度
        let itemnum = Math.ceil(e.offsetX / itemwidth)
        //第几张图片 除以 10
        this.X = itemnum - 1 % 10
        this.Y = Math.ceil(itemnum / 10) - 1
        this.speedBar = Math.ceil(e.offsetX / boxwidth * 100)
      },
      // 移入滚动弹幕效果
      extensionEnter(index){
        this.extensionimgindex = index
        clearInterval(this.timer)
        this.timer = setInterval(()=>{
          jquery('.extension-top-img').eq(index).find('.extension-danmu-item').eq(this.timenum-1).removeAttr("style");
            this.timenum++
            if(this.timenum > this.extensionlist[index].list.length-1){
              this.timenum = 0
            }
            jquery('.extension-top-img').eq(index).find('.extension-danmu-item')
            .eq(this.timenum).css({"left":"-100%","transition":"left "+(Math.random()*2+3).toFixed(3)+"s linear 0s"})
        },2000)
      },
      extensionLeave(index){
        clearInterval(this.timer)
        jquery('.extension-top-img').eq(index).find('.extension-danmu-item').removeAttr("style");
      },
      // 稍后再看的移入效果
      laterMove(index) {
          this.$refs.extensionDynamicBg[index].classList.add('dynamicActive')
          this.$refs.extensionDanmuContent[index].classList.add('dynamicActive')

      },
      // 稍后再看的移出效果
      laterOut(index) {
        setTimeout(() => {
          this.$refs.extensionDynamicBg[index].classList.remove('dynamicActive')
          this.$refs.extensionDanmuContent[index].classList.remove('dynamicActive')
        },400)
      },
      //向右侧导航栏传递数据
       emitTop(){
         eventBus.$emit('eventFrom',this.$refs.BannerRotation.offsetTop)
       }
    },
    mounted() {
      setTimeout(()=>{
        this.emitTop()
      },30)
      this.boxW = this.$refs.extensionTopImg[0].clientWidth
      this.boxH = this.$refs.extensionTopImg[0].clientHeight
    },
    created() {
    },
    watch:{
      extensionimgindex(){
        this.timenum = -1
      }
    }
  }
</script>

<style scoped>
  .banner-top {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
  }

  /* 左侧 */
  .rotation-carousel {
    width: 550px;
    height: 242px;
    overflow: hidden;
    border-radius: 2px;
    position: relative;
    cursor: pointer;
  }

  .banner-carousel-item {
    width: 100%;
    height: 100%;
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    /* position: relative; */
  }

  .banner-carousel-item::before {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, .5));
    width: 100%;
    height: 48px;
    border-radius: 2px;
    /* z-index: 200; */
  }

  .banner-carousel-title {
    position: absolute;
    width: 70%;
    bottom: 10px;
    left: 12px;
    color: #fff;
    display: flex;
    overflow: hidden;
    align-items: center;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 14px;
  }

  .rotation-carousel-more {
    position: absolute;
    right: 12px;
    bottom: 44px;
    padding: 4px 8px;
    background-color: rgba(0, 0, 0, .65);
    color: #FFFFFF;
    font-size: 12px;
    z-index: 12;
    opacity: 0;
    cursor: pointer;
    border-radius: 2px;
    transition: all .3s;
  }

  .rotation-carousel-more>i {
    /* vertical-align: middle; */
    font-size: 14px;
  }

  .rotation-carousel:hover .rotation-carousel-more {
    opacity: 1;
  }

  /* 右侧 */
  .recommend-content {
    width: 638px;
    height: 242px;
    position: relative;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: space-between;
  }

  .recommend-item {
    margin-bottom: 10px;
    width: 206px;
    height: 116px;
    border-radius: 2px;
    /* overflow: hidden; */
    position: relative;
    cursor: pointer;
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
  }

  .recommend-item::before {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, .5));
    width: 100%;
    height: 48px;
    border-radius: 0 0 2px 2px;
  }

  .recommend-item-info {
    width: 100%;
    height: 100%;
    position: relative;
    border-radius: 2px;
    overflow: hidden;
  }

  .recommend-item-info::before {
    content: "";
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, .7);
    left: 0;
    top: 0;
    opacity: 0;
    transition: opacity .2s;
  }

  .recommend-item-content {
    width: 100%;
    position: absolute;
    top: 64px;
    left: 0;
    transition: all .2s;
    padding: 26px 10px 10px;
    color: #fff;
    box-sizing: border-box;
  }

  .recommend-item-title {
    font-size: 14px;
    height: 18px;
    line-height: 18px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 500;
    margin-bottom: 6px;
  }

  .recommend-item-name,
  .recommend-item-playnum {
    font-size: 12px;
    color: #e0e0e0 !important;
    margin-bottom: 3px;
  }

  .recommend-item-name>i {
    vertical-align: middle;
    margin-right: 3px;
    font-size: 16px;
  }

  .recommend-item:hover .recommend-item-content {
    top: 0;
  }

  .recommend-item:hover .recommend-item-info::before {
    opacity: 1;
  }

  .recommend-item:hover .recommend-item-title {
    height: 36px;
    white-space: normal;
  }

  .recommend-later {
    position: absolute;
    width: 28px;
    height: 28px;
    background-color: rgba(0, 0, 0, .9);
    color: #fff;
    right: 8px;
    bottom: 8px;
    text-align: center;
    line-height: 28px;
    border-radius: 2px;
    opacity: 0;
    transition: opacity .2s .2s;
    z-index: 20;
  }

  .recommend-later>i {
    font-size: 28px;
  }

  .recommend-later-text {
    position: absolute;
    left: -19px;
    top: -28px;
    color: #FFFFFF;
    padding: 4px 8px;
    border-radius: 4px;
    white-space: nowrap;
    background-color: rgba(0, 0, 0, .8);
    line-height: 18px;
    z-index: 30;
    transform: scale(0);
    transition: all .2s;
  }

  .recommend-later:hover .recommend-later-text {
    transform: scale(1);
  }


  .recommend-btn {
    position: absolute;
    width: 32px;
    height: 70px;
    background: rgba(0, 0, 0, .6);
    color: #fff;
    text-align: center;
    line-height: 70px;
    font-size: 25px;
    top: 50%;
    transform: translateY(-50%);
    font-weight: 600;
    cursor: pointer;
    opacity: 0;
    transition: all .3s;
  }

  .recommend-btn-perv {
    left: 0;
    border-radius: 0 2px 2px 0;
  }

  .recommend-btn-next {
    right: 0;
    border-radius: 2px 0px 0px 2px;
  }

  .recommend-content:hover .recommend-btn {
    opacity: 1;
  }

  .recommend-item:hover .recommend-later {
    opacity: 1;
  }

  /* 推广 */
  .extension-container {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
  }

  .left-extension {
    width: 854px;
  }

  .left-extension-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 36px;
    margin-bottom: 16px;
  }

  .left-extension-info {
    display: inline-flex;
  }

/*  .icon-extension {
    margin-right: 6px;
    font-size: 36px;
    vertical-align: middle;
    color: rgb(255, 215, 120)
  } */
  .ext-svg{
    width: 36px;
    height:36px;
    margin-right: 6px;
    vertical-align: middle;
    fill: currentColor;
  }

  .text-extension {
    font-size: 20px;
    margin-right: 20px;
    vertical-align: bottom;
    line-height: 36px;
    color: #212121;
    cursor: default;
  }

  .title-extension {
    line-height: 36px;
    color: #505050;
    cursor: pointer;
  }

  .title-extension>i {
    color: #f0361b;
    margin-right: 3px;
    font-size: 20px;
  }

  .title-extension:hover {
    color: #00A1D6;
  }

  .extension-video-container {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
  }

  .extension-video-item {
    width: 206px;
    cursor: pointer;
  }

  .extension-top-img {
    position: relative;
    width: 100%;
    height: 116px;
  }

  .topimg-box {
    position: relative;
    width: 100%;
    height: 100%;
  }

  .topimg-box::before {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 48px;
    background: linear-gradient(transparent, rgba(0, 0, 0, .5));
    border-radius: 0 0 2px 2px;
  }

  .extension-video-img {
    width: 100%;
    height: 100%;
    border-radius: 2px;
  }

  .extension-top-count {
    display: flex;
    align-items: center;
    position: absolute;
    bottom: 0;
    color: #fff;
    justify-content: space-between;
    width: 100%;
    padding: 6px 8px;
    box-sizing: border-box;
    line-height: 16px;
  }

  .extension-video-title {
    font-size: 14px;
    line-height: 20px;
    margin: 10px 0 8px;
    height: 40px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    font-weight: 500;
    padding-right: 12px;
    transition: color .3s;
  }

  .extension-dynamic-bg {
    width: 100%;
    height: 100%;
    position: absolute;
    left: 0;
    top: 0;
    opacity: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 10;
    border-radius: 2px;
    background-size: 2060px;
    /* transition: opacity .2s .2s; */
  }
  .extension-danmu-content{
    position: absolute;
    width: 100%;
    height:100%;
    left:0;
    top:0;
    pointer-events: none;
    overflow: hidden;
    transition: opacity .3s ;
    z-index: 20;
    opacity: 0;
  }
  .extension-danmu-item{
    position: absolute;
    color:#fff;
    white-space: pre;/*空白会被浏览器保留*/
    top: 8px;
    text-shadow: 1px 1px 2px #001;
    left: 100%;
    /* transition: left 4s linear; */
  }
  .extension-danmu-item:nth-child(even){
    top:28px;
  }

  .extension-dynamic-top {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 10px;
    border-color: #000;
    border-style: solid;
    border-width: 4px 8px;
    background: #444;
    box-sizing: border-box;
  }

  .extension-dynamic-top>span {
    display: block;
    background: #fff;
    height: 2px;
    transition: width .1s;
  }

  .extension-upname {
    margin-top: 60px;
    display: flex;
    align-items: center;
    font-size: 12px;
    color: #999;
    line-height: 16px;
  }

  .extension-upname>i {
    vertical-align: middle;
    margin-right: 4px;
  }

  .extension-video-Later {
    position: absolute;
    width: 28px;
    height: 28px;
    background-color: rgba(0, 0, 0, .7);
    color: #fff;
    right: 8px;
    bottom: 8px;
    text-align: center;
    line-height: 28px;
    border-radius: 2px;
    opacity: 0;
    transition: opacity .2s .2s;
    z-index: 20;
  }

  .extension-video-Later>i {
    font-size: 28px;
  }

  .extension-video-latertext {
    position: absolute;
    left: -19px;
    top: -28px;
    color: #FFFFFF;
    padding: 4px 8px;
    border-radius: 4px;
    white-space: nowrap;
    background-color: rgba(0, 0, 0, .8);
    line-height: 18px;
    z-index: 30;
    transform: scale(0);
    transition: all .2s;
  }

  .extension-top-img:hover .extension-video-Later {
    opacity: 1;
  }

  .extension-top-img:hover .extension-video-title {
    color: #00A1D6;
  }

  .extension-top-img:hover .extension-top-count {
    /* display: none; */
  }

  .extension-top-img:hover .extension-dynamic-bg {
    opacity: 1;
  }

  .extension-video-Later:hover .extension-video-latertext {
    transform: scale(1);
  }

  .dynamicActive {
    opacity: 0 !important;
  }

  .extension-upname:hover{
    color:#00A1D6;
  }
  /* .extension-top-img:hover .extension-danmu-item{
    left: -100%;
  } */
  .extension-top-img:hover .extension-danmu-content{
    opacity: 1;
  }

  .right-online {
    width: 320px;
  }
  .right-online-header{
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 3px;
    margin-bottom: 19px;
    height: 30px;
    border: 1px solid #E7E7E7;
    border-radius: 2px;
    background: #f4f4f4;
    color:#505050;
    line-height: 30px;
    box-sizing: border-box;
    cursor: pointer;
  }
  .right-online-title{
    flex: 1;
    text-align: center;
  }
  .right-online-header:hover .right-online-title{
    color:#00A1D6;
  }
  .right-ad-bottom>img{
    width: 100%;
    border-radius: 2px;
    vertical-align: middle;
    cursor: pointer;
  }
  /* 电竞赛事 */
  .ext-match{
    display: flex;
    margin-bottom:40px;
    justify-content: space-between;
  }
  .ext-match-left{
    width:854px;
  }
  .ext-match-header{
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    height: 36px;
  }
  .ext-match-header-icon{
    display: inline-flex;
  }
  .ext-match-header-icon>img{
    width: 36px;
    height:36px;
    margin-right: 6px;
    vertical-align: middle;
  }
  .ext-match-header-icon>span{
    margin: 0 20px 0 0;
    vertical-align: bottom;
    font-size: 20px;
    line-height: 36px;
    cursor: pointer;
  }
  .ext-match-header-icon>span:hover{
    color:#00A1D6;
  }
  .ext-content{
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
  }
  .ext-item{
    width: 206px;
    cursor: pointer;
  }
  .ext-item-container{
    width: 100%;
    height: 116px;
    position: relative;
  }
  .ext-item-linbar{
    width: 100%;
    height:100%;
    position: relative;
  }
  .ext-item-linbar::before{
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 48px;
    background: linear-gradient(transparent, rgba(0, 0, 0, .5));
    border-radius: 0 0 2px 2px;
  }
  .ext-play-img{
    width: 100%;
    height:100%;
    border-radius: 2px;
  }
  .ext-item-count{
    position: absolute;
    display: flex;
    width: 100%;
    align-items: center;
    padding:6px 8px;
    justify-content: space-between;
    color:#FFFFFF;
    line-height: 16px;
    box-sizing: border-box;
    bottom: 0;
  }
  .ext-count-left{
    display: flex;
    align-items: center;
  }
  .ext-count-left>span:nth-child(1){
    margin-right: 10px;
  }
  .ext-count-left>span:nth-child(1)>i{
    vertical-align: middle;
    margin-right: 2px;
    font-size: 18px;
  }
  .ext-count-left>span:nth-child(2)>i{
    vertical-align: middle;
    margin-right: 2px;
  }
  .ext-later{
    position: absolute;
    width: 28px;
    height: 28px;
    background-color: rgba(0, 0, 0, .7);
    color: #fff;
    right: 8px;
    bottom: 8px;
    text-align: center;
    line-height: 28px;
    border-radius: 2px;
    opacity: 0;
    transition: opacity .2s .2s;
    z-index: 20;
  }
  .ext-later>i {
    font-size: 28px;
  }

  .ext-later-text {
    position: absolute;
    left: -19px;
    top: -28px;
    color: #FFFFFF;
    padding: 4px 8px;
    border-radius: 4px;
    white-space: nowrap;
    background-color: rgba(0, 0, 0, .8);
    line-height: 18px;
    z-index: 30;
    transform: scale(0);
    transition: all .2s;
  }
  .ext-item-container:hover .ext-later{
    opacity: 1;
  }
  .ext-later:hover .ext-later-text{
    transform: scale(1);
  }
  .ext-item-title{
    font-size: 14px;
    line-height: 20px;
    margin: 10px 0 8px;
    height: 40px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp:2;
    -webkit-box-orient: vertical;
    font-weight: 500;
    padding-right: 12px;
    transition: color .3s;
  }
  .ext-item-state{
    display: inline-block;
    color:#fff;
    background: #fb7299;
    border-radius: 2px;
    line-height: 16px;
    width: 56px;
    text-align: center;
    margin-right:5px;
    font-size: 12px;
  }
  .ext-item-state>span{
    display: inline-block;
    width: 10px;
    height:10px;
    background: url(../../assets/img/living.gif) no-repeat center;
    background-size: cover;
    margin-left:3px;
  }
  .ext-item-title:hover{
    color: #00A1D6;
  }
  .ext-match-right{
    padding-top:50px;
    width: 320px;
  }
  .ext-match-right>img{
    width: 100%;
    border-radius: 2px;
    cursor: pointer;
  }



</style>
<style>
  .BannerRotation .el-carousel__arrow {
    display: none;
  }

  .BannerRotation .el-carousel__indicators--horizontal {
    left: auto;
    right: 12px !important;
    bottom: 0;
    transform: translateX(0);
  }

  .BannerRotation .el-carousel__indicator:hover .el-carousel__button {
    opacity: 1 !important;
  }

  .BannerRotation .el-carousel__button {
    width: 10px;
    height: 10px;
    border: 2px solid #fff;
    box-sizing: border-box;
    border-radius: 50%;
    background-color: #FFFFFF;
    opacity: 1;
    transition: all .3s;
  }

  .BannerRotation .el-carousel__button:hover {
    background-color: #00a4d6;
    transform: scale(1.3);
    opacity: 1;
  }

  .BannerRotation .is-active .el-carousel__button {
    background-image: url(../../assets/img/banner_bottom_icon.png) !important;
    background-repeat: no-repeat;
    background-size: cover;
    border-width: 0;
    border-color: transparent;
    transform: scale(1.8);
    background-color: transparent;
  }

  .BannerRotation .el-carousel__indicator--horizontal {
    margin-left: 3px;
  }
</style>
